<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>HTTP和HTTPS对比 | jzhmcoo1</title><meta name="keywords" content="网络协议,HTTP,HTTPS,SSL"><meta name="author" content="lixing"><meta name="copyright" content="lixing"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="参考链接  https:&#x2F;&#x2F;juejin.cn&#x2F;post&#x2F;6844903830916694030    https:&#x2F;&#x2F;www.nowcoder.com&#x2F;tutorial&#x2F;96&#x2F;4700c6f1f3334c9191a38406002efa65  HTTPS是HTTP在传输层上进行SSL加密实现的 http: 超文本传输协议，是互联网上应用最为广泛的一种网络协议，是一个客户端和服务器端请求和应答的标">
<meta property="og:type" content="article">
<meta property="og:title" content="HTTP和HTTPS对比">
<meta property="og:url" content="https://www.lihangzhu.com/2021/06/13/HTTP-&-HTTPS/index.html">
<meta property="og:site_name" content="jzhmcoo1">
<meta property="og:description" content="参考链接  https:&#x2F;&#x2F;juejin.cn&#x2F;post&#x2F;6844903830916694030    https:&#x2F;&#x2F;www.nowcoder.com&#x2F;tutorial&#x2F;96&#x2F;4700c6f1f3334c9191a38406002efa65  HTTPS是HTTP在传输层上进行SSL加密实现的 http: 超文本传输协议，是互联网上应用最为广泛的一种网络协议，是一个客户端和服务器端请求和应答的标">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://jzhmcoo1-1258918430.cos.ap-shanghai.myqcloud.com/markdown/20210613102244.png">
<meta property="article:published_time" content="2021-06-13T02:23:01.000Z">
<meta property="article:modified_time" content="2021-06-13T02:23:04.000Z">
<meta property="article:author" content="lixing">
<meta property="article:tag" content="网络协议">
<meta property="article:tag" content="HTTP">
<meta property="article:tag" content="HTTPS">
<meta property="article:tag" content="SSL">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://jzhmcoo1-1258918430.cos.ap-shanghai.myqcloud.com/markdown/20210613102244.png"><link rel="shortcut icon" href="/images/favicon.png"><link rel="canonical" href="https://www.lihangzhu.com/2021/06/13/HTTP-&amp;-HTTPS/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><meta name="google-site-verification" content="pcqGakY4hww-Mg9iGN4mQw6v_y_IRvYmM1l50SAcPpg"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    jQuery: 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
    },
    fancybox: {
      js: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
      css: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: true,
  isanchor: true
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = { 
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2021-06-13 10:23:04'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches
          const isLightMode = window.matchMedia('(prefers-color-scheme: light)').matches
          const isNotSpecified = window.matchMedia('(prefers-color-scheme: no-preference)').matches
          const hasNoSupport = !isDarkMode && !isLightMode && !isNotSpecified

          if (t === undefined) {
            if (isLightMode) activateLightMode()
            else if (isDarkMode) activateDarkMode()
            else if (isNotSpecified || hasNoSupport) {
              const now = new Date()
              const hour = now.getHours()
              const isNight = hour <= 6 || hour >= 18
              isNight ? activateDarkMode() : activateLightMode()
            }
            window.matchMedia('(prefers-color-scheme: dark)').addListener(function (e) {
              if (saveToLocal.get('theme') === undefined) {
                e.matches ? activateDarkMode() : activateLightMode()
              }
            })
          } else if (t === 'light') activateLightMode()
          else activateDarkMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const fontSizeVal = saveToLocal.get('global-font-size')
    if (fontSizeVal !== undefined) {
      document.documentElement.style.setProperty('--global-font-size', fontSizeVal + 'px')
    }
    })(window)</script><meta name="generator" content="Hexo 5.4.0"><link rel="alternate" href="/atom.xml" title="jzhmcoo1" type="application/atom+xml">
</head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="author-avatar"><img class="avatar-img" data-lazy-src="https://jzhmcoo1-1258918430.cos.ap-shanghai.myqcloud.com/markdown/avatar.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/archives/"><div class="headline">文章</div><div class="length-num">36</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/tags/"><div class="headline">标签</div><div class="length-num">37</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/categories/"><div class="headline">分类</div><div class="length-num">9</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-heartbeat"></i><span> 娱乐</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page" href="/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/message/"><i class="fa-fw fa fa-coffee"></i><span> 留言板</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-user-friends"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于我</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('https://jzhmcoo1-1258918430.cos.ap-shanghai.myqcloud.com/markdown/20210613102244.png')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">jzhmcoo1</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-heartbeat"></i><span> 娱乐</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page" href="/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/message/"><i class="fa-fw fa fa-coffee"></i><span> 留言板</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-user-friends"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于我</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">HTTP和HTTPS对比</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2021-06-13T02:23:01.000Z" title="发表于 2021-06-13 10:23:01">2021-06-13</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2021-06-13T02:23:04.000Z" title="更新于 2021-06-13 10:23:04">2021-06-13</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/StudyNotes/">StudyNotes</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">2.4k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>7分钟</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h3 id="参考链接"><a href="#参考链接" class="headerlink" title="参考链接"></a>参考链接</h3><blockquote>
<p> <a target="_blank" rel="noopener" href="https://juejin.cn/post/6844903830916694030">https://juejin.cn/post/6844903830916694030</a></p>
</blockquote>
<blockquote>
<p> <a target="_blank" rel="noopener" href="https://www.nowcoder.com/tutorial/96/4700c6f1f3334c9191a38406002efa65">https://www.nowcoder.com/tutorial/96/4700c6f1f3334c9191a38406002efa65</a></p>
</blockquote>
<p><strong>HTTPS是HTTP在传输层上进行SSL加密实现的</strong></p>
<p>http: 超文本传输协议，是互联网上应用最为广泛的一种网络协议，是一个客户端和服务器端请求和应答的标准（<strong>TCP</strong>），用于从WWW服务器传输超文本到本地浏览器的传输协议，它可以使浏览器更加高效，使网络传输减少。</p>
<p>https: 是以安全为目标的HTTP通道，简单讲是HTTP的安全版，即HTTP下加入SSL层，HTTPS的安全基础是SSL，因此加密的详细内容就需要SSL。</p>
<p><strong>HTTPS主要作用</strong>是：</p>
<p>（1）对数据进行加密，并建立一个信息安全通道，来保证传输过程中的数据安全;</p>
<p>（2）对网站服务器进行真实身份认证。</p>
<h1 id="HTTP存在的问题"><a href="#HTTP存在的问题" class="headerlink" title="HTTP存在的问题"></a>HTTP存在的问题</h1><ul>
<li>通信使用明文（不加密），内容可能被窃听</li>
<li>无法证明报文的完整性，所以可能遭篡改</li>
<li>不验证通信方的身份，因此有可能遭遇伪装</li>
</ul>
<h1 id="HTTPS优势"><a href="#HTTPS优势" class="headerlink" title="HTTPS优势"></a>HTTPS优势</h1><ul>
<li>数据隐私性：内容经过对称加密，每个连接生成一个唯一的加密密钥</li>
<li>数据完整性：内容传输经过完整性校验</li>
<li>身份认证：第三方无法伪造服务端（客户端）身份</li>
</ul>
<h2 id="区别"><a href="#区别" class="headerlink" title="区别"></a>区别</h2><ul>
<li>HTTPS比HTTP更加安全，对搜索引擎更友好，利于SEO,谷歌、百度优先索引HTTPS网页;</li>
<li>HTTPS需要用到SSL证书，而HTTP不用;</li>
<li>HTTPS标准端口443，HTTP标准端口80;</li>
<li>HTTPS基于传输层，HTTP基于应用层;</li>
<li>HTTPS在浏览器显示绿色安全锁，HTTP没有显示;</li>
</ul>
<h1 id="HTTPS如何解决上述问题？"><a href="#HTTPS如何解决上述问题？" class="headerlink" title="HTTPS如何解决上述问题？"></a>HTTPS如何解决上述问题？</h1><p>HTTPS并非是应用层的一种新协议。只是HTTP通信接口部分用SSL和TLS协议代替而已。</p>
<p>通常，HTTP直接和TCP通信。当使用SSL时，则演变成先和SSL通信，再由SSL和TCP通信了。简言之，<strong>所谓HTTPS，其实就是身披SSL协议这层外壳的HTTP</strong>。</p>
<p><img src= "/img/loading.gif" data-lazy-src="https://jzhmcoo1-1258918430.cos.ap-shanghai.myqcloud.com/markdown/20210613103539-https-essence.png" alt="image.png"></p>
<h2 id="解决内容被窃听——加密"><a href="#解决内容被窃听——加密" class="headerlink" title="解决内容被窃听——加密"></a>解决内容被窃听——加密</h2><h3 id="对称加密"><a href="#对称加密" class="headerlink" title="对称加密"></a>对称加密</h3><p>加密和解密同用一个密钥。加密和解密都会用到密钥。<strong>没有密钥就无法对密码解密，反过来说，任何人只要持有密钥就能解密了</strong>。</p>
<p>以<strong>对称加密方式加密时必须将密钥也发给对方</strong>。可究竟怎样才能安全地转交？在互联网上转发密钥时，如果通信被监听那么密钥就可会落人攻击者之手，同时也就失去了加密的意义。另外还得设法安全地保管接收到的密钥。</p>
<h3 id="非对称加密"><a href="#非对称加密" class="headerlink" title="非对称加密"></a>非对称加密</h3><p>公开密钥加密使用一对非对称的密钥。一把叫做私有密钥，另一把叫做公开密钥。顾名思义，<strong>私有密钥不能让其他任何人知道，而公开密钥则可以随意发布，任何人都可以获得</strong>。</p>
<p>使用公开密钥加密方式，发送密文的一方使用<strong>对方的公开密钥****进行加密处理</strong>，对方收到被加密的信息后，再使用自己的私有密钥进行解密。利用这种方式，不需要发送用来解密的私有密钥，也不必担心密钥被攻击者窃听而盗走。</p>
<p>非对称加密的特点是信息传输一对多，服务器只需要维持一个私钥就能够和多个客户端进行加密通信。</p>
<p>这种方式有以下缺点：</p>
<ul>
<li>公钥是公开的，所以针对私钥加密的信息，黑客截获后可以使用公钥进行解密，获取其中的内容；</li>
<li>公钥并不包含服务器的信息，使用非对称加密算法无法确保服务器身份的合法性，存在中间人攻击的风险，<strong>服务器发送给客户端的公钥可能在传送过程中被中间人截获并篡改；</strong></li>
<li>使用非对称加密<strong>在数据加密解密过程需要消耗一定时间</strong>，降低了数据传输效率；</li>
</ul>
<h3 id="对称加密-非对称加密-HTTPS采用这种方式"><a href="#对称加密-非对称加密-HTTPS采用这种方式" class="headerlink" title="对称加密+非对称加密(HTTPS采用这种方式)"></a>对称加密+非对称加密(HTTPS采用这种方式)</h3><p>（<strong>交换密钥时，使用非对称；传输信息时，使用对称</strong>）</p>
<p>使用对称密钥的好处是解密的效率比较快，使用非对称密钥的好处是可以使得传输的内容不能被破解，因为就算你拦截到了数据，但是没有对应的私钥，也是不能破解内容的。</p>
<p>将对称加密与非对称加密结合起来,充分利用两者各自的优势，<strong>在交换密钥环节使用非对称加密方式，之后的建立通信交换报文阶段则使用对称加密方式</strong>。</p>
<p>具体做法是：<strong>发送密文的一方使用对方的公钥进行加密处理“对称的密钥”，然后对方用自己的私钥解密拿到“对称的密钥”，这样可以确保交换的密钥是安全的前提下，使用对称加密方式进行通信</strong>。所以，HTTPS采用对称加密和非对称加密两者并用的混合加密机制。</p>
<h2 id="解决报文遭篡改——数字签名"><a href="#解决报文遭篡改——数字签名" class="headerlink" title="解决报文遭篡改——数字签名"></a>解决报文遭篡改——数字签名</h2><p>网络传输过程中需要经过很多中间节点，虽然数据无法被解密，但可能被篡改，那如何校验数据的完整性呢？—-校验数字签名。</p>
<h3 id="数字签名作用"><a href="#数字签名作用" class="headerlink" title="数字签名作用"></a>数字签名作用</h3><ul>
<li>能确定消息确实是由发送方签名并发出来的，因为别人假冒不了发送方的签名。</li>
<li>数字签名能确定消息的完整性,证明数据是否未被篡改过。</li>
</ul>
<h3 id="如何生成数字签名"><a href="#如何生成数字签名" class="headerlink" title="如何生成数字签名"></a>如何生成数字签名</h3><p>将一段文本<strong>先用Hash函数生成消息摘要</strong>，然后<strong>用发送者的私钥加密生成数字签名</strong>，与原文文一起传送给接收者。</p>
<p><img src= "/img/loading.gif" data-lazy-src="https://jzhmcoo1-1258918430.cos.ap-shanghai.myqcloud.com/markdown/20210613103406-generate-digital-sign.png" alt="image.png"></p>
<p>接下来就是<strong>接收者校验数字签名</strong>的流程了。</p>
<p><img src= "/img/loading.gif" data-lazy-src="https://jzhmcoo1-1258918430.cos.ap-shanghai.myqcloud.com/markdown/20210613103454-check-digital-sign.png" alt="image.png"></p>
<p>接收者只有用发送者的公钥才能解密被加密的摘要信息，然后用HASH函数对收到的原文产生一个摘要信息，与上一步得到的摘要信息对比。如果相同，则说明收到的信息是完整的，在传输过程中没有被修改，否则说明信息被修改过，因此数字签名能够验证信息的完整性。</p>
<h2 id="解决通信方伪装——数字证书"><a href="#解决通信方伪装——数字证书" class="headerlink" title="解决通信方伪装——数字证书"></a>解决通信方伪装——数字证书</h2><p>数字证书认证机构处于客户端与服务器双方都可信赖的第三方机构的立场上。</p>
<ul>
<li>服务器的运营人员向第三方机构CA提交公钥、组织信息、个人信息(域名)等信息并申请认证;</li>
<li>CA通过线上、线下等多种手段验证申请者提供信息的真实性，如组织是否存在、企业是否合法，是否拥有域名的所有权等;</li>
<li>如信息审核通过，CA会向申请者签发认证文件-证书。证书包含以下信息：申请者公钥、申请者的组织信息和个人信息、签发机构 CA的信息、有效时间、证书序列号等信息的明文，同时包含一个签名。 其中<strong>签名的产生算法：首先，使用散列函数计算公开的明文信息的信息摘要，然后，采用 CA 的私钥对信息摘要进行加密，密文即签名;</strong></li>
<li>客户端 Client 向服务器 Server 发出请求时，Server 返回证书文件;</li>
<li>客户端 Client 读取证书中的相关的明文信息，采用相同的散列函数计算得到信息摘要，然后，利用对应 CA的公钥解密签名数据，对比证书的信息摘要，如果一致，则可以确认证书的合法性，即服务器的公开密钥是值得信赖的。</li>
<li>客户端还会验证证书相关的域名信息、有效时间等信息; 客户端会内置信任CA的证书信息(包含公钥)，如果CA不被信任，则找不到对应 CA的证书，证书也会被判定非法。</li>
</ul>
<h1 id="HTTPS工作流程"><a href="#HTTPS工作流程" class="headerlink" title="HTTPS工作流程"></a>HTTPS工作流程</h1><p><img src= "/img/loading.gif" data-lazy-src="https://jzhmcoo1-1258918430.cos.ap-shanghai.myqcloud.com/markdown/20210613103228-https-work-process.png" alt="image.png"></p>
<ol>
<li>Client<strong>发起一个HTTPS的请求</strong>，根据RFC2818的规定，Client知道需要连接Server的443（默认）端口。</li>
<li>Server把事先配置好的<strong>公钥证书</strong>（public key certificate）返回给客户端。</li>
<li>Client验证公钥证书：比如是否在<strong>有效期</strong>内，证书的用途是不是匹配Client请求的站点，是不是在CRL吊销列表里面，它的上一级证书是否有效，这是一个递归的过程，直到验证到根证书（操作系统内置的Root证书或者Client内置的Root证书）。如果验证通过则继续，不通过则显示警告信息。</li>
<li>Client使用<strong>伪随机数生成器生成加密所使用的对称密钥</strong>，然后<strong>用证书的公钥加密这个对称密钥</strong>，发给Server。</li>
<li>Server使用自己的<strong>私钥</strong>（private key）<strong>解密</strong>这个消息，<strong>得到****对称密钥</strong>。至此，Client和Server<strong>双方都持有了相同的对称密钥</strong>。</li>
<li>Server使用<strong>对称密钥加密“明文内容A”</strong>，发送给Client。</li>
<li>Client使用<strong>对称密钥解密响应的密文</strong>，得到“明文内容A”。</li>
<li>Client再次发起HTTPS的请求，使用对称密钥加密请求的“明文内容B”，然后Server使用对称密钥解密密文，得到“明文内容B”。</li>
</ol>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined">lixing</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://www.lihangzhu.com/2021/06/13/HTTP-&amp;-HTTPS/">https://www.lihangzhu.com/2021/06/13/HTTP-&amp;-HTTPS/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://www.lihangzhu.com" target="_blank">jzhmcoo1</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/%E7%BD%91%E7%BB%9C%E5%8D%8F%E8%AE%AE/">网络协议</a><a class="post-meta__tags" href="/tags/HTTP/">HTTP</a><a class="post-meta__tags" href="/tags/HTTPS/">HTTPS</a><a class="post-meta__tags" href="/tags/SSL/">SSL</a></div><div class="post_share"><div class="social-share" data-image="https://jzhmcoo1-1258918430.cos.ap-shanghai.myqcloud.com/markdown/20210613102244.png" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/2021/06/17/Hash/"><img class="prev-cover" data-lazy-src="https://jzhmcoo1-1258918430.cos.ap-shanghai.myqcloud.com/markdown/20210617202259-hash-table.jpg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">散列表查找</div></div></a></div><div class="next-post pull-right"><a href="/2021/02/23/Webpack%E6%89%93%E5%8C%85css/"><img class="next-cover" data-lazy-src="https://gitee.com/jzhmcoo1/jzhmcoo1picrepo/raw/master/img/webpack-logo2.png" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">Webpack打包CSS</div></div></a></div></nav><hr/><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div></div><div class="comment-wrap"><div><div class="vcomment" id="vcomment"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="card-info-avatar is-center"><img class="avatar-img" data-lazy-src="https://jzhmcoo1-1258918430.cos.ap-shanghai.myqcloud.com/markdown/avatar.jpg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/><div class="author-info__name">lixing</div><div class="author-info__description">👨🏻‍💻 好好学习，天天敲代码 👩🏻‍💻</div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">36</div></a></div><div class="card-info-data-item is-center"><a href="/tags/"><div class="headline">标签</div><div class="length-num">37</div></a></div><div class="card-info-data-item is-center"><a href="/categories/"><div class="headline">分类</div><div class="length-num">9</div></a></div></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/jzhmcoo1"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/jzhmcoo1" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="mailto:jzhmzlxocoo1@gmail.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a><a class="social-icon" href="/atom.xml" target="_blank" title="RSS"><i class="fa fa-rss"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content">真正的大师,永远都怀着一颗学徒的心</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%8F%82%E8%80%83%E9%93%BE%E6%8E%A5"><span class="toc-number">1.</span> <span class="toc-text">参考链接</span></a></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#HTTP%E5%AD%98%E5%9C%A8%E7%9A%84%E9%97%AE%E9%A2%98"><span class="toc-number"></span> <span class="toc-text">HTTP存在的问题</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#HTTPS%E4%BC%98%E5%8A%BF"><span class="toc-number"></span> <span class="toc-text">HTTPS优势</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8C%BA%E5%88%AB"><span class="toc-number"></span> <span class="toc-text">区别</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#HTTPS%E5%A6%82%E4%BD%95%E8%A7%A3%E5%86%B3%E4%B8%8A%E8%BF%B0%E9%97%AE%E9%A2%98%EF%BC%9F"><span class="toc-number"></span> <span class="toc-text">HTTPS如何解决上述问题？</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%A7%A3%E5%86%B3%E5%86%85%E5%AE%B9%E8%A2%AB%E7%AA%83%E5%90%AC%E2%80%94%E2%80%94%E5%8A%A0%E5%AF%86"><span class="toc-number"></span> <span class="toc-text">解决内容被窃听——加密</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AF%B9%E7%A7%B0%E5%8A%A0%E5%AF%86"><span class="toc-number">1.</span> <span class="toc-text">对称加密</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%9D%9E%E5%AF%B9%E7%A7%B0%E5%8A%A0%E5%AF%86"><span class="toc-number">2.</span> <span class="toc-text">非对称加密</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AF%B9%E7%A7%B0%E5%8A%A0%E5%AF%86-%E9%9D%9E%E5%AF%B9%E7%A7%B0%E5%8A%A0%E5%AF%86-HTTPS%E9%87%87%E7%94%A8%E8%BF%99%E7%A7%8D%E6%96%B9%E5%BC%8F"><span class="toc-number">3.</span> <span class="toc-text">对称加密+非对称加密(HTTPS采用这种方式)</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%A7%A3%E5%86%B3%E6%8A%A5%E6%96%87%E9%81%AD%E7%AF%A1%E6%94%B9%E2%80%94%E2%80%94%E6%95%B0%E5%AD%97%E7%AD%BE%E5%90%8D"><span class="toc-number"></span> <span class="toc-text">解决报文遭篡改——数字签名</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%95%B0%E5%AD%97%E7%AD%BE%E5%90%8D%E4%BD%9C%E7%94%A8"><span class="toc-number">1.</span> <span class="toc-text">数字签名作用</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%A6%82%E4%BD%95%E7%94%9F%E6%88%90%E6%95%B0%E5%AD%97%E7%AD%BE%E5%90%8D"><span class="toc-number">2.</span> <span class="toc-text">如何生成数字签名</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%A7%A3%E5%86%B3%E9%80%9A%E4%BF%A1%E6%96%B9%E4%BC%AA%E8%A3%85%E2%80%94%E2%80%94%E6%95%B0%E5%AD%97%E8%AF%81%E4%B9%A6"><span class="toc-number"></span> <span class="toc-text">解决通信方伪装——数字证书</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#HTTPS%E5%B7%A5%E4%BD%9C%E6%B5%81%E7%A8%8B"><span class="toc-number"></span> <span class="toc-text">HTTPS工作流程</span></a></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2021/08/01/%E8%B7%A8%E5%9F%9F/" title="跨域问题"><img data-lazy-src="https://jzhmcoo1-1258918430.cos.ap-shanghai.myqcloud.com/markdown/20210801204426-browser.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="跨域问题"/></a><div class="content"><a class="title" href="/2021/08/01/%E8%B7%A8%E5%9F%9F/" title="跨域问题">跨域问题</a><time datetime="2021-08-01T12:42:27.000Z" title="发表于 2021-08-01 20:42:27">2021-08-01</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/06/26/Css-Core-Concepts/" title="css关键概念"><img data-lazy-src="https://gitee.com/jzhmcoo1/jzhmcoo1picrepo/raw/master/img/css.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="css关键概念"/></a><div class="content"><a class="title" href="/2021/06/26/Css-Core-Concepts/" title="css关键概念">css关键概念</a><time datetime="2021-06-26T02:53:41.000Z" title="发表于 2021-06-26 10:53:41">2021-06-26</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/06/21/Cpp-OJ-Environment/" title="C++OJ环境搭建"><img data-lazy-src="https://jzhmcoo1-1258918430.cos.ap-shanghai.myqcloud.com/markdown/20210621082947.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="C++OJ环境搭建"/></a><div class="content"><a class="title" href="/2021/06/21/Cpp-OJ-Environment/" title="C++OJ环境搭建">C++OJ环境搭建</a><time datetime="2021-06-21T00:28:12.000Z" title="发表于 2021-06-21 08:28:12">2021-06-21</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/06/20/Browser-Cache/" title="浏览器的强缓存和协商缓存"><img data-lazy-src="https://jzhmcoo1-1258918430.cos.ap-shanghai.myqcloud.com/markdown/20210620222035.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="浏览器的强缓存和协商缓存"/></a><div class="content"><a class="title" href="/2021/06/20/Browser-Cache/" title="浏览器的强缓存和协商缓存">浏览器的强缓存和协商缓存</a><time datetime="2021-06-20T14:18:05.000Z" title="发表于 2021-06-20 22:18:05">2021-06-20</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/06/17/Sorting/" title="排序算法汇总"><img data-lazy-src="https://jzhmcoo1-1258918430.cos.ap-shanghai.myqcloud.com/markdown/20210617235208-sorting.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="排序算法汇总"/></a><div class="content"><a class="title" href="/2021/06/17/Sorting/" title="排序算法汇总">排序算法汇总</a><time datetime="2021-06-17T15:53:46.000Z" title="发表于 2021-06-17 23:53:46">2021-06-17</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2021 By lixing</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text"><a target="_blank" rel="noopener" href="http://www.beian.miit.gov.cn/"><img class="icp-icon" src="/images/icp.png"><span>备案号：沪ICP备20019376号-1</span></a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="font-plus" type="button" title="放大字体"><i class="fas fa-plus"></i></button><button id="font-minus" type="button" title="缩小字体"><i class="fas fa-minus"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><a id="to_comment" href="#post-comment" title="直达评论"><i class="fas fa-comments"></i></a><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div></div><hr/><div id="local-search-results"></div><span class="search-close-button"><i class="fas fa-times"></i></span></div><div id="search-mask"></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload/dist/lazyload.iife.min.js"></script><script src="/js/search/local-search.js"></script><script>var preloader = {
  endLoading: () => {
    document.body.style.overflow = 'auto';
    document.getElementById('loading-box').classList.add("loaded")
  },
  initLoading: () => {
    document.body.style.overflow = '';
    document.getElementById('loading-box').classList.remove("loaded")

  }
}
window.addEventListener('load',preloader.endLoading())</script><div class="js-pjax"><script>function loadValine () {
  function initValine () {
    let initData = {
      el: '#vcomment',
      appId: 'eLIUaG0QmIrM06RLR7ib4AWK-gzGzoHsz',
      appKey: '4WOHEFT9gxfwKDLWQ3Dlc1xi',
      placeholder: '英雄别着急走,留下姓名~',
      avatar: 'monsterid',
      meta: 'nick,mail,link'.split(','),
      pageSize: '10',
      lang: 'zh-CN',
      recordIP: false,
      serverURLs: '',
      emojiCDN: 'https://i0.hdslb.com/bfs/emote/',
      emojiMaps: {"2020":"dc709fac0d361370bcf0d36d32adb97df7c95824.png@112w_112h.png","热词系列_知识增加":"142409b595982b8210b2958f3d340f3b47942645.png@112w_112h.png","热词系列_梦幻联动":"4809416be5ca787c2ec3e897e4fd022a58da6e0e.png@112w_112h.png","热词系列_希望没事":"6c0d2e6c486d1ba5afd6204a96e102652464a01d.png@112w_112h.png","热词系列_泪目":"bba3703ab90b7d16fe9dbcb85ed949db687f8331.png@112w_112h.png","热词系列_保护":"55f8f6445ca7c3170cdfc5b16036abf639ce9b57.png@112w_112h.png","热词系列_害怕":"d77e2de26da143249f0c0ad7a608c27152c985bf.png@112w_112h.png","热词系列_爱了爱了":"2a165b555ba20391316366c664ed7891883dc5aa.png@112w_112h.png","热词系列_吹爆":"b528220f9c37256ed6a37f05bf118e44b08b81e5.png@112w_112h.png","热词系列_三连":"21f15fe11b7a84d2f2121c16dec50a4e4556f865.png@112w_112h.png","热词系列_可以":"e08543c71202b36c590094417fcfbb80c3506cd8.png@112w_112h.png","热词系列_打卡":"a9cf77c78e1b9b40aa3ed4862402fba008ee2f51.png@112w_112h.png","热词系列_妙啊":"0e98299d7decf5eaffad854977946075c3e91cb8.png@112w_112h.png","热词系列_这次一定":"a01ca28923daa7cc896c42f27deb4914e20dd572.png@112w_112h.png","热词系列_AWSL":"c37f88cf799f9badf9d84b7671dc3dd98c0fc0c2.png@112w_112h.png","热词系列_递话筒":"98e6950e39fbb4dd1c576042063ca632074070ba.png@112w_112h.png","热词系列_你细品":"535e00658e7e47966f154d3a167fa2365ebc4321.png@112w_112h.png","热词系列_咕咕":"d8065c2e7ce48c929317a94553499a46fecc262a.png@112w_112h.png","热词系列_你可真星":"54c8ddff400abfe388060cabfbb579280fdea1be.png@112w_112h.png","热词系列_标准结局":"3de98174b510cf7dc5fd1bd08c5d881065e79137.png@112w_112h.png","热词系列_危":"5cc6c3357c4df544dd8de9d5c5c0cec97c7c9a56.png@112w_112h.png","热词系列_张三":"255a938f39cea625032b6650036b31aa26c50a3c.png@112w_112h.png","热词系列_害":"cbe798a194612958537c5282fcca7c3bcd2aa15c.png@112w_112h.png","热词系列_我裂开了":"29bd57ec4e8952880fea6c9e47aee924e91f10c4.png@112w_112h.png","热词系列_有内味了":"7ca61680a905b5b6e2e335c630e725b648b03b4d.png@112w_112h.png","热词系列_猛男必看":"c97064450528a0e45c7e7c365a15fbb13fd61d8c.png@112w_112h.png","热词系列_奥力给":"c9b8683827ec6c00fea5327c9bec14f581cef2aa.png@112w_112h.png","热词系列_问号":"c1d1e76c12180adc8558f47006fe0e7ded4154bb.png@112w_112h.png","热词系列_我哭了":"9e0b3877d649aaf6538fbdd3f937e240a9d808e4.png@112w_112h.png","热词系列_高产":"9db817cba4a7f4a42398f3b2ec7c0a8e0c247c42.png@112w_112h.png","热词系列_我酸了":"a8cbf3f6b8cd9377eeb15b9172f3cd683b2e4650.png@112w_112h.png","热词系列_真香":"e68497c775feaac1c3b1a6cd63a50cfb11b767c4.png@112w_112h.png","热词系列_我全都要":"d424d1ad8d14c1c9b8367842bc68c658b9229bc1.png@112w_112h.png","热词系列_神仙UP":"a49e0d0db1e7d35a0f7411be13208951ab448f03.png@112w_112h.png","热词系列_你币有了":"84820c2b147a8ca02f3c4006b63f76c6313cbfa0.png@112w_112h.png","热词系列_不愧是你":"9ff2e356797c57ee3b1675ade0883d2d2247be9b.png@112w_112h.png","热词系列_锤":"35668cc12ae25b9545420e4a85bf21a0bfc03e5d.png@112w_112h.png","热词系列_秀":"50782fbf5d9b7f48f9467b5c53932981e321eedc.png@112w_112h.png","热词系列_爷关更":"faad40c56447f1f8abcb4045c17ce159d113d1fd.png@112w_112h.png","热词系列_有生之年":"f41fdafe2d0fbb8e8bc1598d2cf37e355560103a.png@112w_112h.png","热词系列_镇站之宝":"24e7a6a6e6383c987215fb905e3ee070aca259b5.png@112w_112h.png","热词系列_我太南了":"a523f3e4c63e4db1232365765d0ec452f83be97e.png@112w_112h.png","热词系列_完结撒花":"ea9db62ff5bca8e069cd70c4233353a802835422.png@112w_112h.png","热词系列_大师球":"f30089248dd137c568edabcb07cf67e0f6e98cf3.png@112w_112h.png","热词系列_知识盲区":"ccc94600b321a28116081e49ecedaa4ee8728312.png@112w_112h.png","热词系列_“狼火”":"33ccd3617bfa89e9d1498b13b7542b63f163e5de.png@112w_112h.png","口罩":"3ad2f66b151496d2a5fb0a8ea75f32265d778dd3.png@112w_112h.png","微笑":"685612eadc33f6bc233776c6241813385844f182.png@112w_112h.png","笑":"81edf17314cea3b48674312b4364df44d5c01f17.png@112w_112h.png","呲牙":"b5a5898491944a4268360f2e7a84623149672eb6.png@112w_112h.png","OK":"4683fd9ffc925fa6423110979d7dcac5eda297f4.png@112w_112h.png","星星眼":"63c9d1a31c0da745b61cdb35e0ecb28635675db2.png@112w_112h.png","哦呼":"362bded07ea5434886271d23fa25f5d85d8af06c.png@112w_112h.png","嫌弃":"de4c0783aaa60ec03de0a2b90858927bfad7154b.png@112w_112h.png","喜欢":"8a10a4d73a89f665feff3d46ca56e83dc68f9eb8.png@112w_112h.png","酸了":"92b1c8cbceea3ae0e8e32253ea414783e8ba7806.png@112w_112h.png","大哭":"2caafee2e5db4db72104650d87810cc2c123fc86.png@112w_112h.png","害羞":"9d2ec4e1fbd6cb1b4d12d2bbbdd124ccb83ddfda.png@112w_112h.png","无语":"44667b7d9349957e903b1b62cb91fb9b13720f04.png@112w_112h.png","疑惑":"b7840db4b1f9f4726b7cb23c0972720c1698d661.png@112w_112h.png","调皮":"8290b7308325e3179d2154327c85640af1528617.png@112w_112h.png","喜极而泣":"485a7e0c01c2d70707daae53bee4a9e2e31ef1ed.png@112w_112h.png","奸笑":"bb84906573472f0a84cebad1e9000eb6164a6f5a.png@112w_112h.png","偷笑":"6c49d226e76c42cd8002abc47b3112bc5a92f66a.png@112w_112h.png","大笑":"ca94ad1c7e6dac895eb5b33b7836b634c614d1c0.png@112w_112h.png","阴险":"ba8d5f8e7d136d59aab52c40fd3b8a43419eb03c.png@112w_112h.png","捂脸":"6921bb43f0c634870b92f4a8ad41dada94a5296d.png@112w_112h.png","囧":"12e41d357a9807cc80ef1e1ed258127fcc791424.png@112w_112h.png","呆":"33ad6000d9f9f168a0976bc60937786f239e5d8c.png@112w_112h.png","抠鼻":"cb89184c97e3f6d50acfd7961c313ce50360d70f.png@112w_112h.png","惊喜":"0afecaf3a3499479af946f29749e1a6c285b6f65.png@112w_112h.png","惊讶":"f8e9a59cad52ae1a19622805696a35f0a0d853f3.png@112w_112h.png","笑哭":"c3043ba94babf824dea03ce500d0e73763bf4f40.png@112w_112h.png","妙啊":"b4cb77159d58614a9b787b91b1cd22a81f383535.png@112w_112h.png","doge":"bba7c12aa51fed0199c241465560dfc2714c593e.png@112w_112h.png","滑稽":"d15121545a99ac46774f1f4465b895fe2d1411c3.png@112w_112h.png","吃瓜":"4191ce3c44c2b3df8fd97c33f85d3ab15f4f3c84.png@112w_112h.png","打call":"431432c43da3ee5aab5b0e4f8931953e649e9975.png@112w_112h.png","点赞":"1a67265993913f4c35d15a6028a30724e83e7d35.png@112w_112h.png","鼓掌":"895d1fc616b4b6c830cf96012880818c0e1de00d.png@112w_112h.png","尴尬":"cb321684ed5ce6eacdc2699092ab8fe7679e4fda.png@112w_112h.png","冷":"cb0ebbd0668640f07ebfc0e03f7a18a8cd00b4ed.png@112w_112h.png","灵魂出窍":"43d3db7d97343c01b47e22cfabeca84b4251f35a.png@112w_112h.png","委屈":"d2f26cbdd6c96960320af03f5514c5b524990840.png@112w_112h.png","傲娇":"010540d0f61220a0db4922e4a679a1d8eca94f4e.png@112w_112h.png","疼":"905fd9a99ec316e353b9bd4ecd49a5f0a301eabf.png@112w_112h.png","吓":"9c10c5ebc7bef27ec641b8a1877674e0c65fea5d.png@112w_112h.png","生病":"0f25ce04ae1d7baf98650986454c634f6612cb76.png@112w_112h.png","吐":"06946bfe71ac48a6078a0b662181bb5cad09decc.png@112w_112h.png","嘘声":"e64af664d20716e090f10411496998095f62f844.png@112w_112h.png","捂眼":"c5c6d6982e1e53e478daae554b239f2b227b172b.png@112w_112h.png","思考":"cfa9b7e89e4bfe04bbcd34ccb1b0df37f4fa905c.png@112w_112h.png","再见":"fc510306bae26c9aec7e287cdf201ded27b065b9.png@112w_112h.png","翻白眼":"eba54707c7168925b18f6f8b1f48d532fe08c2b1.png@112w_112h.png","哈欠":"888d877729cbec444ddbd1cf4c9af155a7a06086.png@112w_112h.png","奋斗":"bb2060c15dba7d3fd731c35079d1617f1afe3376.png@112w_112h.png","墨镜":"3a03aebfc06339d86a68c2d893303b46f4b85771.png@112w_112h.png","撇嘴":"531863568e5668c5ac181d395508a0eeb1f0cda4.png@112w_112h.png","难过":"a651db36701610aa70a781fa98c07c9789b11543.png@112w_112h.png","抓狂":"4c87afff88c22439c45b79e9d2035d21d5622eba.png@112w_112h.png","生气":"3195714219c4b582a4fb02033dd1519913d0246d.png@112w_112h.png","视频卫星":"dce6fc7d6dfeafff01241924db60f8251cca5307.png@112w_112h.png","11周年":"d3b2d5dc028c75ae4df379f4c3afbe186d0f6f9b.png@112w_112h.png","鸡腿":"c7860392815d345fa69c4f00ef18d67dccfbd574.png@112w_112h.png","干杯":"8da12d5f55a2c7e9778dcc05b40571979fe208e6.png@112w_112h.png","爱心":"ed04066ea7124106d17ffcaf75600700e5442f5c.png@112w_112h.png","锦鲤":"643d6c19c8164ffd89e3e9cdf093cf5d773d979c.png@112w_112h.png","胜利":"b49fa9f4b1e7c3477918153b82c60b114d87347c.png@112w_112h.png","加油":"c7aaeacb21e107292d3bb053e5abde4a4459ed30.png@112w_112h.png","保佑":"fafe8d3de0dc139ebe995491d2dac458a865fb30.png@112w_112h.png","抱拳":"89516218158dbea18ab78e8873060bf95d33bbbe.png@112w_112h.png","响指":"1b5c53cf14336903e1d2ae3527ca380a1256a077.png@112w_112h.png","支持":"3c210366a5585706c09d4c686a9d942b39feeb50.png@112w_112h.png","拥抱":"41780a4254750cdaaccb20735730a36044e98ef3.png@112w_112h.png","怪我咯":"07cc6077f7f7d75b8d2c722dd9d9828a9fb9e46d.png@112w_112h.png","跪了":"f2b3aee7e521de7799d4e3aa379b01be032698ac.png@112w_112h.png","黑洞":"e90ec4c799010f25391179118ccd9f66b3b279ba.png@112w_112h.png","老鼠":"8e6fb491eb1bb0d5862e7ec8ccf9a3da12b6c155.png@112w_112h.png","福到了":"5de5373d354c373cf1617b6b836f3a8d53c5a655.png@112w_112h.png","加油武汉":"eb966aaa5b690d3f9308a9f936f5b5a72a7f956b.png@112w_112h.png"},
      enableQQ: false,
      path: window.location.pathname,
    }

    if (true) { 
      initData.requiredFields= ('nick,mail'.split(','))
    }
    
    if (false) {
      const otherData = false
      initData = Object.assign(initData, otherData)
    }
    
    const valine = new Valine(initData)
  }

  if (typeof Valine === 'function') initValine() 
  else getScript('https://cdn.jsdelivr.net/npm/valine/dist/Valine.min.js').then(initValine)
}

if ('Valine' === 'Valine' || !false) {
  if (false) btf.loadComment(document.getElementById('vcomment'),loadValine)
  else setTimeout(loadValine, 0)
} else {
  function loadOtherComment () {
    loadValine()
  }
}</script></div><script defer="defer" id="ribbon" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-ribbon.min.js" size="150" alpha="0.6" zIndex="-1" mobile="false" data-click="false"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>